import java.util.*;

public class ACEEMention implements Comparable {

  ACEEntity m_entity;

  String m_strID;
  String m_strType;

  // full span
  int m_nBeg;
  int m_nLen;

  // head span
  int m_nHBeg;
  int m_nHLen;

  // mention attributes
  HashMap m_mapAtt;

  public ACEEMention()
  {
    m_mapAtt = new HashMap();
  }

  public String getAttribute(String strKey)
  {
    return (String) m_mapAtt.get(strKey);
  }

  public void setAttribute(String strKey, String strVal)
  {
    m_mapAtt.put(strKey, strVal);
  }

  public int compareTo(Object o)
  {
    ACEEMention em = (ACEEMention) o;

    if (m_nHBeg < em.m_nHBeg)
      return -1;

    if (m_nHBeg == em.m_nHBeg)
      if (m_nHLen < em.m_nHLen)
	return -1;
      else if (m_nHLen == em.m_nHLen)
	return 0;

    return 1;
  }

}
